#pragma once
#include <list>
#include <string>
#include <Windows.h>
/**
Class, used to read-write driver settings,
and forcing driver reload them
*/
class CDriverController
{
public:
    CDriverController();
    virtual ~CDriverController();
    //returns true if communication with driver successfully established, false otherwise
    bool Initialize();
    const std::list<std::wstring>& GetFilePaths()const;
    //NOTE: Hiding enabled will be applied immediately after call
    bool GetHidingEnabled()const;
    void SetHidingEnabled(bool enabled);
    void AddHiddenPath(const std::wstring& path);
    void RemoveHiddenPath(int index);
    void ApplyPathChanges();
private:
    bool EnsureDriverIsRunning();
    std::list<std::wstring> m_FilePaths;
    bool m_bHidingEnabled;
    HKEY m_hParametersKey;
    HANDLE m_hServiceDevice;
};
